//
//  DNCryingManager.h
//  DanoneEA
//
//  Created by Senela on 16/10/18.
//  Copyright © 2016年 翔傲科技. All rights reserved.
//

#import "DNDairyManager.h"
#import "DNCryingModel.h"

@interface DNCryingManager : DNDairyManager

+ (instancetype)sharedInstance;
 

/**
 *  save crying dairy in local db 
 *
 *  @param diaryInfo <DNCryingModel>
 *
 *  @return YES/NO
 */
-(BOOL)saveDairyToLocalDB:(DNCryingModel *)diaryInfo;

/**
 *  save crying dairy list in local db
 *
 *  @param diaryArr
 *
 *  @return YES/NO
 */
-(BOOL)saveCryingDairyArrToLocalDB:(NSArray *)diaryArr;


/**
 *  delete diary info from local DB by appId
 *
 *  @param appId
 *
 *  @return YES/NO
 */
-(BOOL)deleteDairyFromLocalDBByAppId:(NSString *)appId;


/**
 *  Check wheather the crySttime and cryEntime is overlap
 *
 *  @param diaryInfo <DNCryingModel> to be add
 *
 *  @return @return YES/NO
 */
-(BOOL)isOverlapInLocalDB:(DNCryingModel *)diaryInfo;

/**
 *  upload offline crying daily to application server
 */
-(void)synchronousCryingData;



@end
